package com.sise.rsc.service;

import com.sise.rsc.entity.Role;
import com.sise.rsc.repository.RoleRepository;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class RoleService {

    @Resource
    private RoleRepository roleRepository;
    public Role findRoleById(int id){
        return  roleRepository.findRoleById(id);
    }
    public Role findRoleByAuthority(String authority){
        return roleRepository.findRoleByAuthority(authority);
    }
    public void save(Role role){
        roleRepository.save(role);
    }
}
